<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
  var arrayBuffer = new ArrayBuffer(2);
  var buffer = new DataView(arrayBuffer)

  buffer.setInt8(0, 127)
  buffer.setInt8(1, 11111)
  console.log(arrayBuffer)
  console.log(buffer.buffer)
  console.log(buffer.getInt8(0))
  console.log((11111).toString(16))




  /*var floatArray = new Float32Array(arrayBuffer); /!*Use the Float32 instance of the Buffer*!/
  var uintArray = new Uint8Array(arrayBuffer); /!*Use the Uint8 instance of the Buffer*!/

  floatArray[0] = 32480; /!*Define a value to the Float32Array*!/
  /!*In order to correctly access the Uint8Array, it must be reversed for some reason?!*!/
  var newUintArray = uintArray.reverse();
  var newarr = (new DataView(newUintArray.buffer)).getFloat32();

  console.log(newarr)

  var arrayBuffer = new ArrayBuffer(8);
  var floatArray = new Float64Array(arrayBuffer);
  var uintArray = new Uint8Array(arrayBuffer);

  floatArray[0] = 30543;
  var newUintArray = uintArray.reverse();
  var newarr = (new DataView(newUintArray.buffer)).getFloat64();

  console.log(newarr)*/
</script>
</body>
</html>
